<?php
include 'index.php';
?>

<div id="body-wrapper">
    <div id="main-content">
        <div class="content-box">

            <?php
            include '../db/db_con.php';
            ?>
            <?php

            if (isset($_POST['adduser'])) {

                $username = $_POST['username'];
                $password = $_POST['password'];

                $query = "INSERT INTO  login(name,password)VALUES ('{$username}','{$password}')";

                if (mysql_query($query)) {

                    echo '
        <div class="notification success png_bg">
	<a href="" class="close"><img src="resources/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
	<div>
	     This User Added Is Done ..
	</div>
        </div>';
                } else {
                    echo '
        <div class="notification error png_bg">
	<a href="" class="close"><img src="resources/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
	<div>
		This user Added Is Not Done
	</div>
	</div>';
                }
            }
            ?>

            <div class="content-box-header" id = "addProducts" >

                <h3><?= Add_User ?></h3>

                <div class="clear"></div>

            </div>

            <div class="content-box-content">

                <div class="tab-content default-tab" id="tab2">

                    <form action="AddUsers.php?type=User&lang=<?= $lang ?>" method="post" name = "adduser" enctype="multipart/form-data">

                        <fieldset>

                            <p>
                                <label><?= Username ?></label>
                                <input class="text-input small-input" type="text" id="small-input" name="username" />
                            </p>

                            <p>
                                <label><?= Password ?></label>
                                <input class="text-input small-input" type="text" id="small-input" name="password" />
                            </p>



                            <p>
                                <input class="button" type="submit" name = "adduser" value="<?= Add_User ?>" />
                            </p>

                        </fieldset>

                        <div class="clear"></div>

                    </form>
                </div>
            </div> 

        </div> 
    </div>
</div>